package com.zjdt.project.mysystem.service.impl;

import java.util.List;
import com.zjdt.common.utils.DateUtils;
import com.zjdt.project.system.domain.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjdt.project.mysystem.mapper.SwipperMapper;
import com.zjdt.project.mysystem.domain.Swipper;
import com.zjdt.project.mysystem.service.ISwipperService;

/**
 * 轮播图片Service业务层处理
 * 
 * @author dusin
 * @date 2024-07-26
 */
@Service
public class SwipperServiceImpl implements ISwipperService 
{
    @Autowired
    private SwipperMapper swipperMapper;

    /**
     * 查询轮播图片
     * 
     * @param swipperId 轮播图片主键
     * @return 轮播图片
     */
    @Override
    public Swipper selectSwipperBySwipperId(Long swipperId)
    {
        return swipperMapper.selectSwipperBySwipperId(swipperId);
    }

    /**
     * 查询轮播图片列表
     * 
     * @param swipper 轮播图片
     * @return 轮播图片
     */
    @Override
    public List<Swipper> selectSwipperList(Swipper swipper)
    {
        return swipperMapper.selectSwipperList(swipper);
    }

    /**
     * 新增轮播图片
     * 
     * @param swipper 轮播图片
     * @return 结果
     */
    @Override
    public int insertSwipper(Swipper swipper)
    {
        swipper.setCreateTime(DateUtils.getNowDate());
        return swipperMapper.insertSwipper(swipper);
    }

    /**
     * 修改轮播图片
     * 
     * @param swipper 轮播图片
     * @return 结果
     */
    @Override
    public int updateSwipper(Swipper swipper)
    {
        return swipperMapper.updateSwipper(swipper);
    }



    @Override
    public int updateStatus(Swipper swipper)
    {
        return swipperMapper.updateSwipper(swipper);
    }

    /**
     * 批量删除轮播图片
     * 
     * @param swipperIds 需要删除的轮播图片主键
     * @return 结果
     */
    @Override
    public int deleteSwipperBySwipperIds(Long[] swipperIds)
    {
        return swipperMapper.deleteSwipperBySwipperIds(swipperIds);
    }

    /**
     * 删除轮播图片信息
     * 
     * @param swipperId 轮播图片主键
     * @return 结果
     */
    @Override
    public int deleteSwipperBySwipperId(Long swipperId)
    {
        return swipperMapper.deleteSwipperBySwipperId(swipperId);
    }
}
